﻿using System;
using System.Diagnostics;

namespace UDS.Management
{
    public class Program
    {
        /// <summary>
        /// Running the program in a console application.
        /// </summary>
        public static void Main(string[] args)
        {
            try
            {
                using (SmsSenderService service = new SmsSenderService())
                {
                    service.Start();

                    // Never exit the loop.
                    while (true)
                    {
                        Console.ReadKey(true);
                    }
                }
            }
            catch (Exception exp)
            {
                Logger.WriteLine(string.Format("Unhandled exception: {0}", exp));
                Trace.Flush();
            }
        }
    }
}
